<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>


<link href="<c:url value="/views/jsp/center/trade/pay/lib/css/head2014.css" />" rel="stylesheet" type="text/css" />
<link href="<c:url value="/views/jsp/center/trade/pay/lib/css/orderConfirm2014.css" />" rel="stylesheet" type="text/css" />

<div class="success_box zaixin" style="width: 100%;height: 99%;background-color: #f9f9f9">
	    <div class="s_inner clearfix">
	       <div class="s_l"><i class="s_ok"></i></div>
	       <div class="s_r">
	           <h4>请您在提交订单后<b class="red">24小时</b>内完成支付，否则订单会自动取消。</h4>
	           <div class="s_o">
	                <p class="mb10"><b>订单编号：</b>
		                <a href="#" target="_blank" class="blue mr10">${param.code}</a>
		                <input  type="hidden" id="hiddenCode" name="hiddenCode" value="${param.code}"/>
		                <span class="ml20"> 订单确认金额：<span class="red">
		                <em class="f_a">¥</em>${param.money }</span></span>
                        
	                </p>
	               <div class="p_online" id="orderBankInfo"  >
	                    <div class="zx_pay">
	                       <ul class="clearfix">
	                           <li class="b_502" id="userOrderSelectBank" style="background: none ; width: 180px;">
	                           		<input type="radio" name="bankchecked" class="ra_bank" id="ccb_checked" checked="checked">
	                          		<img alt="" id="allinpay_img"  src="<c:url value="/views/jsp/center/trade/pay/ccbpay/ccb.gif" />">
	                           </li>
                               <li class="b_502" id="userOrderSelectBank"style="background: none ; width: 180px;">
                                   <input type="radio" name="bankchecked"  class="ra_bank" id="boc_checked" >
                                   <img alt="" id="fmcib_img"  src="<c:url value="/views/jsp/center/trade/pay/bocpay/boc.gif" />">
                               </li>
	                           <li class="pay_price" >支付金额：<span class="red"><em class="f_a">¥</em>
	                           ${param.money }</span>
	                           </li>
	                       </ul>
	                       <!--Add by Dancy-->
						   <div class="scanCode clearfix" id="ccbDiv"  style="height: 300px;">

						   <!-- 如果支持APP扫码付款,请修改下面代码,取消注释段代码 -->
<!-- 								<i class="ico_or">&nbsp;</i>
								<div class="sc_box fl"> -->

									<h5 class="sc_tit">使用建行支付</h5>
									<div class="sc_pic">&nbsp;</div>
<!-- 										<a href="javascript:;" onclick="javascript:wuxiao();"class="pay_last_c"></a> -->
									<a href="javascript:;" onclick="javascript:goAndOrderForOrder(0);" class="pay_last_c"></a>
<%-- 								</div>
								<div class="sc_box sc_boxRight fl">
                                    <h5 class="sc_tit">使用辉美APP扫一扫即可付款</h5>
                                    <div class="sc_pic">
										<iframe width="320" height="260" scrolling="no" frameborder="0" src="<c:url value='/views/jsp/mobile/lib/images/qrcode.png' /> "></iframe>
									</div>
								</div> --%>
						   </div>

                            <div class="scanCode clearfix" id="bocDiv"  style="height: 300px;display: none;">

<!--                                 <i class="ico_or">&nbsp;</i>
                                <div class="sc_box fl"> -->

                                    <h5 class="sc_tit">使用中行支付(NB2BRecvOrder)</h5>
                                    <div class="sc_pic">&nbsp;</div>
                                    <a href="javascript:;" onclick="javascript:goAndOrderForOrder(1);" class="pay_last_c"></a>
<%--                                 </div>
                                <div class="sc_box sc_boxRight fl">
                                    <h5 class="sc_tit">使用辉美APP扫一扫即可付款</h5>
                                    <div class="sc_pic">
                                        <iframe width="320" height="260" scrolling="no" frameborder="0" src="<c:url value='/views/jsp/mobile/lib/images/qrcode.png' /> "></iframe>
                                    </div>
                                </div> --%>
                            </div>
                            
					   	  <!--End add-->
	                    </div>
	                    <div class="clearfix"></div>
	               </div>
	           </div>
	       </div>
	    </div>
	</div>
	
<script>
    $(function(){
        $(".panel-tool-close").click(function(){
            var skip;
            <c:if test="${!empty param.skip}">
                skip=<c:out value="${param.skip}"/>;
            </c:if>
            if(skip=="1"){
                location.href='<c:url value="/views/jsp/center/trade/order/c_order_list.jsp" />';
            }
        });
        $("#ccb_checked").click(function(){
            $("#ccbDiv").show();
            $("#bocDiv").hide();
        });
        $("#boc_checked").click(function(){
        	$("#bocDiv").show();
            $("#ccbDiv").hide();
        });
        $("#allinpay_img").click(function(){
            $("#ccb_checked").click();
        });
        $("#fmcib_img").click(function(){
            $("#boc_checked").click();
        });
    });
    function goAndOrderForOrder(type){
        if(type==0){
            window.open('<c:url value="/CCBPay/getCCBPayInfoForFee.s" />?orderCode='+$("#hiddenCode").val());
        }else if(type==1){
            window.open('<c:url value="/B2BPay/getBOCPayInfoForFee.s" />?orderCode='+$("#hiddenCode").val());
        }

        //close 当前window
        $("#win_order_pay").dialog('close');

        $.layer({
            shade: [0],
            area: ['auto','auto'],
            dialog: {
                msg: '感谢您的支付!',
                btns: 2,
                type: 4,
                btn: ['支付完成','支付失败!'],
                yes: function(){
                    location.href='<c:url value="/views/jsp/center/trade/order/c_order_list.jsp" />';
                }, no: function(){
                    location.href='<c:url value="/views/jsp/center/other/c_user_suggest.jsp" />';

                }
            }
        });
    }
    function wuxiao(){
    	alert("暂无支付通道");
    }

    //后期有用  暂留
    function  changeBank(){
        //支付方式判断
        var nowB = $("#showOtherBank input[name='ra_bank'][checked]").val();
        if(nowB!=502){
            layer.msg("暂时不支持此支付方式  后续将会开放!");
            return;
        }
        window.open('<c:url value="/views/jsp/center/trade/pay/allinpay/post.jsp" />');
    }
</script>
